﻿namespace RFIDStation.DeviceDriver.Dtos;

public partial class RFIDHFTagDto
{
    [JsonProperty( "reader" )]
    public string Reader { get; set; }

    [JsonProperty( "uid" )]
    public string UID { get; set; }

    [JsonProperty( "block_data" )]
    public string BlockData { get; set; }
}

partial class RFIDHFTagDto
{
    [JsonProperty( "ants" )]
    public List<AntInfo> AntList { get; set; }

    [JsonProperty( "scan_count" )]
    public long ScanCount => this.AntList.Sum( i => i.Count );
}

partial class RFIDHFTagDto
{
    public class AntInfo
    {
        [JsonProperty( "no" )]
        public int AntNo { get; set; }

        [JsonProperty( "count" )]
        public long Count { get; set; }
    }
}
